#include "employee.h"
Employee::Employee(void)
{
	m_iId = 0;
	m_iAge = 0;
	strcpy(m_strName,"hehe");
	m_cSex = 'w';
}
Employee::Employee(int id,int age,const char* name,char sex)
{
	m_iId = id;
	m_iAge = age;
	strcpy(m_strName,name);
	m_cSex = sex;
}
int Employee::getId(void)
{
	return m_iId;
}
int Employee::getAge(void)
{
	return m_iAge;
}
const char* Employee::getName(void)
{
	return m_strName;
}
char Employee::getSex(void)
{
	return m_cSex;
}
void Employee::setId(int id)
{
	m_iId = id;
}
void Employee::setAge(int age)
{
	m_iAge = age;
}
void Employee::setName(const char* name)
{
	strcpy(m_strName,name);
}
void Employee::setSex(char sex)
{
	m_cSex = sex;
}
ostream& operator<<(ostream& os,const Employee& emp)
{
	return os << emp.m_iId << " " << emp.m_strName <<" "<< emp.m_cSex <<" "<< emp.m_iAge;
}
istream& operator>>(istream& is,Employee& emp)
{
	return is >> emp.m_iId >> emp.m_strName >> emp.m_cSex >> emp.m_iAge;
}
